package net.shopxx.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;


/**
 * 实体类 - 生产单
 */

@Entity
public class ProduceOrder extends BaseEntity{

	private static final long serialVersionUID = -7519486834544313431L;
	
	private Boolean isEnabled;// 账号是否启用

	private Branch Branch;// 分公司ID

	private Date distribTime;// 分配日期
	
	private Date compTime;// 完成日期
	
	private String distribManager;// 分配人
	
	private String distribStaff;// 分配人
	
//	private Admin admin;// 用户
	
	private Date sendTime;// 发货日期
	
//	private String productId;// 产品ID
	
	private String isState;// 状态
	
	private String produce_id;// 生产单编号
	
	private Product product ; //产品
	
	
	
	private Order order ; //订单
	
//	@ManyToOne(fetch = FetchType.LAZY)
//	public Admin getAdmin() {
//		return admin;
//	}
//
//
//	public void setAdmin(Admin admin) {
//		this.admin = admin;
//	}

	public void setOrder(Order order) {
		this.order = order;
	}







	@ManyToOne(fetch = FetchType.LAZY)
	public Order getOrder() {
		return order;
	}



	@ManyToOne(fetch = FetchType.LAZY)
	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}





	public String getIsState() {
		return isState;
	}

	public void setIsState(String isState) {
		this.isState = isState;
	}

	public Boolean getIsEnabled() {
		return isEnabled;
	}

	public void setIsEnabled(Boolean isEnabled) {
		this.isEnabled = isEnabled;
	}



	public Date getDistribTime() {
		return distribTime;
	}

	public void setDistribTime(Date distribTime) {
		this.distribTime = distribTime;
	}

	public Date getCompTime() {
		return compTime;
	}

	public void setCompTime(Date compTime) {
		this.compTime = compTime;
	}


	public String getDistribManager() {
		return distribManager;
	}


	public void setDistribManager(String distribManager) {
		this.distribManager = distribManager;
	}


	public String getDistribStaff() {
		return distribStaff;
	}
	
	public void setDistribStaff(String distribStaff) {
		this.distribStaff = distribStaff;
	}




	@Transient
	public boolean isEnabled() {
		return this.isEnabled;
	}

	public String getProduce_id() {
		return produce_id;
	}

	public void setProduce_id(String produce_id) {
		this.produce_id = produce_id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Branch getBranch() {
		return Branch;
	}


	public void setBranch(Branch branch) {
		Branch = branch;
	}
}